<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%@ include file="../common/include.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>仓库</title>
<script type="text/javascript"><!--
function add(){
    window.location.href="<%=request.getContextPath() %>/warehouse/add";
}

function del(id){
	var s="<%=request.getContextPath() %>/warehouse/?m=del&id="+id;
}
--></script>
</head>
<body>
<table>
	<thead>
		<tr>
			<th>名称</th>
			<th>编码</th>
			<th>地址</th>
			<th>是否使用</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach items="${list}" var="o">
			<tr id="<c:out value="${o.id}"/>">
				<td><c:out value="${o.name}" /></td>
				<td><c:out value="${o.code}" /></td>
				<td><c:out value="${o.address}" /></td>
				<td><c:out value="${o.used}" /></td>
				<td><a href="" onclick="del(<c:out value="${o.id}"/>)">del</a></td>
			</tr>
		</c:forEach>
	</tbody>
</table>
<div><input id="add" type="button" onclick="add()" value="添加" /></div>
</body>
</html>